import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
	history: createWebHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
	routes: [
		{
			path: '/',
			redirect: '/home',
			meta:{
				title: '首页'
			}
		},
		{
			path: '/home',
			name: 'home',
			component: () => import(/* webpackChunkName: "home" */ './../views/home.vue'),
			meta: {
				title: '首页'
			}
		},
		{
			path: '/test1',
			name: 'test1',
			component: () => import(/* webpackChunkName: "home" */ './../views/test1.vue'),
			meta: {
				title: '测试1'
			}
		},
		{
			path: '/test2',
			name: 'test2',
			component: () => import(/* webpackChunkName: "home" */ './../views/test2.vue'),
			meta: {
				title: '测试2'
			}
		},
		{
			path: '/test3',
			name: 'test3',
			component: () => import(/* webpackChunkName: "home" */ './../views/test3.vue'),
			meta: {
				title: '测试3'
			}
		},
	]
})

export default router
